package de.dailab.graphworld.ontology;

import java.awt.Color;

public class Team {
	private final String teamName;
	private Color teamColor;
	
	public Team(String teamName) {
		this.teamName = teamName;
		this.teamColor = null;
	}
	
	public Team(String teamName, Color teamColor) {
		this.teamName = teamName;
		this.teamColor = teamColor;
	}
	
	public Color getTeamColor() {
		return teamColor;
	}

	public void setTeamColor(Color teamColor) {
		this.teamColor = teamColor;
	}

	public String getTeamName() {
		return teamName;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((teamName == null) ? 0 : teamName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Team other = (Team) obj;
		if (teamName == null) {
			if (other.teamName != null)
				return false;
		} else if (!teamName.equals(other.teamName))
			return false;
		return true;
	}
}
